module FeedHelper
  def feed_description blog_entry
    html = ""
    html << "Permalink: #{auto_link(target_link(blog_entry))} "
    html << "<br/><br/>"
    html << blog_body(blog_entry)
    html << "<br/><br/>" if blog_entry.attachments.size > 0
    blog_entry.attachments.each do |attachment|
      html << 
        render(
          :partial => "attachments/#{attachment.attachable_type.tableize.singularize}", 
          :object => attachment.attachable, 
          :locals => {
            :attachee => blog_entry } )
    end
    
    html << "<br/><hr/><br/>"
    html
  end
end
